<?php
namespace core\lib\drive\log;
use core\lib\conf;

class  file
 {
    public $path;

    public function __construct() {
        $this->path = conf::get( 'option' )['PATH'];
    }

    public function log( $message, $file = null ) {


        $message = date( 'Y-m-d H:i:s' ) .' '.$message .PHP_EOL;
        $file= $this->path.'/'.date( 'Y-m-d' ).'.txt';

        file_put_contents( $file,$message,FILE_APPEND | LOCK_EX);
    }

}
